def draw_MultiCircle(t, y): """Make turtle t draw multiple circles of y""" for i in range (11,0,-1): t.penup() t.goto(0,-y*i) t.pendown() t.speed(20) if i % 2 == 0: t.begin_fill() t.fillcolor("red") t.circle(y*i) t.end_fill() t.hideturtle() else: t.begin_fill() t.fillcolor("yellow") t.circle(y*i) t.end_fill() t.hideturtle() wn = turtle.Screen() wn.bgcolor("black") wn.title("The Darts' Invaestigation") A = turtle.Turtle() draw_MultiCircle(A, 20) B = turtle.Turtle() for s in range (0,10): x = random.uniform(-150,150) y = random.uniform(-150,150) B.penup() B.goto(x+s,y+s) B.pendown() B.stamp() wn.mainloop()
You need to enable Javascript in your browser to edit pages.
help on how to format text